home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
cucd
/
programming
/
oberonv4
/
source
/
system
/
modules.mod
(
.txt
)
< prev
next >
Wrap
Oberon Text
|
1996-04-24
|
1KB
|
36 lines
Syntax10.Scn.Fnt
ParcElems
Alloc
Syntax24b.Scn.Fnt
(* AMIGA *)
MODULE Modules; (* 7-Aug-1993/cn *)
IMPORT
SYSTEM, Amiga, Kernel;
CONST
ModNameLen*=Kernel.ModNameLength;
Command*=PROCEDURE();
Module*=Kernel.Module;
ModuleName*=Kernel.ModuleName;
importing*,imported*:ModuleName;
res*:INTEGER;
PROCEDURE ThisMod*(name:ARRAY OF CHAR):Module;
mod:Module;
BEGIN
COPY(name,importing);
Amiga.ThisMod(
name,SYSTEM.VAL(LONGINT,mod),res,SYSTEM.VAL(LONGINT,Kernel.modules),imported
IF res#0 THEN mod:=NIL; END; (* << CN *)
RETURN mod;
END ThisMod;
PROCEDURE ThisCommand*(mod:Module; name:ARRAY OF CHAR):Command;
cmd:Command;
BEGIN
Amiga.ThisCommand(SYSTEM.VAL(LONGINT,mod),name,SYSTEM.VAL(LONGINT,cmd),res);
RETURN cmd;
END ThisCommand;
PROCEDURE Free*(name:ARRAY OF CHAR; all:BOOLEAN);
BEGIN
Amiga.Free(name,all,res,SYSTEM.VAL(LONGINT,Kernel.modules));
END Free;
END Modules.